﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASB.CC.Business.CIS;
using ASBCC.Business;

namespace ASB.CC.Web
{
    public partial class CISAgreement : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.Button btnAccept;

        protected void Page_Load(object sender, EventArgs e)
        {
            btnAccept.Click += new EventHandler(btnAccept_Click);

        }

        protected void btnAccept_Click(object sender, EventArgs e)
        {
            HttpContext.Current.Session["agreement-accept"] = "Accept";

            var belongsto = LogInfoHelper.GetUserRole((this.User as CSPrincipal).Role2s);

            if (belongsto == "CID")
            {
                GlobalHelper.LogOperation(this.User.Identity.Name, SystemModule.CID, "User: " + this.User.Identity.Name + "; Accept the CIS agreement (同意并接受CIS保密条款): " + DateTime.Now);
            }
            if (belongsto == "CIO")
            {
                GlobalHelper.LogOperation(this.User.Identity.Name, SystemModule.CIO, "User: " + this.User.Identity.Name + "; Accept the CIS agreement (同意并接受CIS保密条款): " + DateTime.Now);
            }

           
        }

    }
}
